package cn.chen.sparkproject.dao.impl;

import cn.chen.sparkproject.dao.ISessionRandomExtractDao;
import cn.chen.sparkproject.domain.SessionRandomExtract;
import cn.chen.sparkproject.jdbc.JdbcHelper;

public class SessionRandomExtractDaoImpl implements ISessionRandomExtractDao{

    @Override
    public void insert(SessionRandomExtract sessionRandomExtract) {

        String sql = "insert into session_random_extract values(?,?,?,?,?)";
        Object[] params = new Object[]{
                sessionRandomExtract.getTaskid(),
                sessionRandomExtract.getSessionid(),
                sessionRandomExtract.getStartTime(),
                sessionRandomExtract.getSearchKeyWords(),
                sessionRandomExtract.getClickCategoryIds()
        };

        JdbcHelper jdbcHelper = JdbcHelper.getInstance();
        jdbcHelper.executeUpdate(sql, params);

    }

}
